#ifndef MAINFORM_H
#define MAINFORM_H

#include <QtGui>
#include "ui_mainForm.h"
#include "chnwidget.h"
#include "devwidget.h"
#include "m61850widget.h"
#include "endwidget.h"
#include "updateconfwidget.h"
#include "boxwidget.h"
#include "ftputil.h"
#include "logdlg.h"
#include "statethread.h"
#include "ucconfigwidget.h"

class MainForm:public QMainWindow,public Ui::MainWindow
{
    Q_OBJECT

 public:
    MainForm();
    virtual ~MainForm();

public:
    ChnWidget *chnWidget;
    DevWidget *devWidget;
    M61850Widget *m61850Widget;
    EndWidget *endwidget;
    UpdateConfWidget *updateConfWidget;
    BoxWidget *box;
    QLabel *statusLabel;
    LogDlg *logDlg;
    StateThread *stateThread;
    UcConfigWidget *ucConfigWidget;

private:
    void createStatusBar();

signals:
    void addLog(LogType type,LogLevel level,const QString &msg);


private slots:
    void startOneConf();
    void switchPage(int index);
    void viewOneConf();
    void viewBoxSet();
    void updateStatusBar(LogType type,LogLevel level,const QString &msg);
    void viewLog();
    void updateRunState();
    void openHelp();
    void openUcConfig();
};

#endif // MAINFORM_H
